home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1599 / 1392 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
  2. Date: Mon, 16 May 94 10:52:49 +0200
  3. Message-Id: <9405160852.AA29210@issan.informatik.uni-dortmund.de>
  4. To: mint@atari.archive.umich.edu
  5. Subject: MiNT 1.10: bug in pipe_close
  6.  
  7. The processes waiting on a pipe should not be waked up in pipe_close
  8. unless it is the last close for the fileptr.  There is no real state
  9. change on the pipe, thus cancelling the selects on the pipe is wrong.
  10. (The patch is bigger than necessary because of the indentation
  11. change.)
  12.  
  13. --- orig/pipefs.c    Thu Feb 10 00:08:10 1994
  14. +++ pipefs.c    Sat May 14 01:11:04 1994
  15. @@ -926,22 +926,23 @@
  16.  
  17.      this = (struct fifo *)f->fc.index;
  18.  
  19. +    if (f->links <= 0) {
  20. +
  21.  /* wake any processes waiting on this pipe */
  22. -    wake(IO_Q, (long)this->inp);
  23. -    if (this->inp->rsel)
  24. -        wakeselect(this->inp->rsel);
  25. -    if (this->inp->wsel)
  26. -        wakeselect(this->inp->wsel);
  27. -
  28. -    if (this->outp) {
  29. -        wake(IO_Q, (long)this->outp);
  30. -        if (this->outp->wsel)
  31. -            wakeselect(this->outp->wsel);
  32. -        if (this->outp->rsel)
  33. -            wakeselect(this->outp->rsel);
  34. -    }
  35. +        wake(IO_Q, (long)this->inp);
  36. +        if (this->inp->rsel)
  37. +            wakeselect(this->inp->rsel);
  38. +        if (this->inp->wsel)
  39. +            wakeselect(this->inp->wsel);
  40. +
  41. +        if (this->outp) {
  42. +            wake(IO_Q, (long)this->outp);
  43. +            if (this->outp->wsel)
  44. +                wakeselect(this->outp->wsel);
  45. +            if (this->outp->rsel)
  46. +                wakeselect(this->outp->rsel);
  47. +        }
  48.  
  49. -    if (f->links <= 0) {
  50.  /* remove the file pointer from the list of open file pointers 
  51.   * of this pipe
  52.   */
  53.  
  54. -- 
  55. +------------------------------------------------------------------------+
  56. Andreas Schwab                                      "And now for something
  57. schwab@ls5.informatik.uni-dortmund.de                completely different"
  58. * Linux/Atari is coming soon, stay tuned * But don't hold your breath... *
  59.